package gang.org.springframework.framework.annotation;

import gang.org.springframework.framework.core.annotation.GangAliasFor;
import gang.org.springframework.framework.support.GangBeanNameGenerator;

import java.lang.annotation.*;

/**
 * 类说明：gang.chen springboot深度实践
 * Retention:保留
 * @author gang.chen
 * @since 2022/5/22
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
public @interface GComponentScan {

    @GangAliasFor("basePackages")
    String[] value() default {};

    @GangAliasFor("value")
    String[] basePackages() default {};

    Class<?>[] basePackageClasses() default {};

    Class<? extends GangBeanNameGenerator> nameGenerator() default  GangBeanNameGenerator.class;

    Class<? extends GangScopeMetadataResolver> scopeResolver() default GangAnnotationScopeMetadataResolver.class;

    GangScopeProxyNode scopeProxy() default GangScopeProxyNode.Default;

    String resourcePattern() default GangClassPathScanningCandidateComponentProvider.default_resource_pattern;

    boolean useDefaultFilters() default true;

    GangFilter[] includeFilters() default {};

    GangFilter[] excludeFilters() default {};

    boolean lazyInit() default false;

    @Retention(RetentionPolicy.RUNTIME)
    @Target({})
    @interface GangFilter{

        GangFilterType type() default GangFilterType.Annotation;

        Class<?>[] value() default {};

        Class<?>[] classes() default {};

        String[] pattern() default {};
    }
}
